﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using s2b.ControleDesenvolvimentoProjetos.Util.Auxiliar;

namespace s2b.ControleDesenvolvimentoProjetos
{
    public partial class WFVisualizarTarefas : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            switch (e.CommandName)
            {
                case "Delete":
                    Auxiliar.DeletarRegistro(e, GridView1, "ID_TAREFA", "TAREFA");
                    break;
                case "Edit":
                    Response.Redirect(String.Format("WFTarefaIndividual.aspx?ID_TAREFA={0}", Auxiliar.RetornaIdRegistro(e, GridView1, "ID_TAREFA")));
                    break;
                case "View":
                    Response.Redirect(String.Format("WFTarefaIndividual.aspx?ID_TAREFA={0}", Auxiliar.RetornaIdRegistro(e, GridView1, "ID_TAREFA")));


                    break;
                case "Atribuir":
                    Response.Redirect(String.Format("WFAtribuirTarefa.aspx?ID_TAREFA={0}", Auxiliar.RetornaIdRegistro(e, GridView1, "ID_TAREFA")));


                    break;

                default:
                    break;
            }
        }

        
    }
}